import { Controller, Get, Inject } from '@nestjs/common';
import { AppService } from './app.service';
import { ConfigService } from '@nestjs/config';
@Controller()
export class AppController {
  @Inject(ConfigService)
  private configService;
  constructor(private readonly appService: AppService) {}

  @Get()
  getHello(): any {
    const config = {
      port: this.configService.get('db.host'),
      host: this.configService.get('db.port'),
    };
    console.log(config);
    return config;
  }
}
